using System;
using System.Web;
using System.Web.Services;
using AjaxControlToolkit;

namespace ScottCateAjax2008.Lesson08
{
    /// <summary>
    /// Summary description for E_CombineScriptsHandler
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class E_CombineScriptsHandler : IHttpHandler
    {

        /// <summary>
        /// ProcessRequest implementation outputs the combined script file
        /// </summary>
        /// <param name="context"></param>
        public void ProcessRequest(HttpContext context)
        {
            if (!ToolkitScriptManager.OutputCombinedScriptFile(context))
            {
                throw new InvalidOperationException("Combined script file output failed unexpectedly.");
            }
        }

        /// <summary>
        /// IsReusable implementation returns true since this class is stateless
        /// </summary>
        public bool IsReusable
        {
            get { return true; }
        }
    }
}









